@namespace BlazorFluentUI
@inherits FluentUIComponentBase

@if (IconType == IconType.Image)
{
    <div class=@($"ms-Icon ms-Icon-imageContainer {this.ClassName}")
         style=@Style
         @ref="RootElementReference"
         role="presentation"
         @attributes=@ExtraParameters>

    </div>
}
else
{
    @if (IconSrc == null )
    {
        <i class=@($"ms-Icon {(string.IsNullOrEmpty(this.IconName) ? "ms-Icon-placeHolder" : "ms-Icon--" + this.IconName)} {this.ClassName}")
           data-icon-name=@IconName
           role="presentation"
           style="@Style"
           @ref="RootElementReference"
           @attributes=@ExtraParameters>
        </i>
    }
    else
    {
        @if (ClassName == null)
        {
            <img style="height:20px" src=@IconSrc>
        }
        else
        {
            <img src=@IconSrc class=@ClassName style="height:20px">
        }


    }
}


